using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class GuideBoardInteract : MonoBehaviour,IInteractable
{
    // Start is called before the first frame update
    public GameObject catBalloon;
    public bool isOpened = false;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void Interact()
    {
        GuideBoardOpen();
    }

    private void GuideBoardOpen()
    {
        if (catBalloon.IsDestroyed())
        {
            gameObject.GetComponent<Animator>().SetBool("isOpen",true);
            isOpened = true;
        }
    }
    
    public void EnterColl()
    {
        if (catBalloon.IsDestroyed())
        {
            GetComponentInChildren<Shadow>().On();
        }
    }

    public void LeaveColl()
    {
        GetComponentInChildren<Shadow>().Off();
    }}
